﻿<%@ Page Title="Upload Report" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Upload.aspx.cs" Inherits="testreportmanager.Upload" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
        
        <h2>Upload trx here</h2>
            <form action="" method="post" class="main" style="width: 25%">
        <asp:Label ID="lblreportname" runat="server" Text="Name"></asp:Label><br />
        <asp:TextBox ID="txtname" runat="server"></asp:TextBox><br /><br />
        <asp:Label ID="lblfeature" runat="server" Text="Select Feature"></asp:Label><br />
        <asp:DropDownList ID="featurelst" runat="server" DataSourceID="featuresource" 
            DataTextField="name" DataValueField="name">
        </asp:DropDownList>
        <asp:LinkButton ID="lbAddFeature" runat="server" onclick="lbAddFeature_Click">Add New Feature</asp:LinkButton>
        <asp:TextBox ID="tFeature" runat="server" Visible="False"></asp:TextBox>
        <asp:Button ID="bFeatureSave" runat="server" Text="Save" Visible="False" 
            onclick="bFeatureSave_Click" />
        <asp:Button ID="btnFeatureCancel" runat="server" 
            onclick="btnFeatureCancel_Click" Text="Cancel" Visible="False" />
        <br /><br />
        
        <asp:Label ID="lblBuild" runat="server" Text="Select Build"></asp:Label><br />
        <asp:DropDownList ID="buildlst" runat="server" DataSourceID="buildsource" 
            DataTextField="name" DataValueField="name">
        </asp:DropDownList>
        <asp:LinkButton ID="lbAddBuild" runat="server" onclick="lbAddBuild_Click">Add New Build</asp:LinkButton>
        <asp:TextBox ID="tBuild" runat="server" Visible="False"></asp:TextBox>
        <asp:Button ID="bBuildSave" runat="server" Text="Save" Visible="False" 
            onclick="bBuildSave_Click" />
        <asp:Button ID="btnBuildCancel" runat="server" onclick="btnBuildCancel_Click" 
            Text="Cancel" Visible="False" />
        <br />
        <asp:XmlDataSource ID="buildsource" runat="server" DataFile="~/metadata.xml" 
            XPath="/metadata/buildlist/build"></asp:XmlDataSource>
        <br />
        <asp:Label ID="Label1" runat="server" Text="***"></asp:Label><br />
        <asp:FileUpload ID="fUpload" runat="server" />        
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            PostBackUrl="~/Upload.aspx" Text="Upload" /><br />        
    <asp:XmlDataSource ID="featuresource" runat="server" DataFile="~/metadata.xml" 
            XPath="/metadata/featurelist/feature"></asp:XmlDataSource>    
        <br />
    </form>
            <h2>Manage Reports</h2>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                DataSourceID="changedata" ForeColor="#333333" GridLines="None" OnRowDeleting="GridView1_OnRowDeleting"
                OnRowDeleted="GridView1_OnRowDeleted" DataKeyNames="name" 
        >        
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                    <asp:BoundField DataField="name" HeaderText="Name" SortExpression="name">
                        <HeaderStyle Font-Size="9pt" />
                        <ItemStyle Font-Size="9pt" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Feature" SortExpression="feature">
                        <EditItemTemplate>
                            <asp:DropDownList ID="dlfeature" runat="server" DataSourceID="featuresource" DataTextField="name"
                                DataValueField="name">
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="featurelbl" runat="server" Text='<%# Bind("feature") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Font-Size="9pt" />
                        <ItemStyle Font-Size="9pt" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Build" SortExpression="build">
                        <EditItemTemplate>
                            <asp:DropDownList ID="dlbuild" runat="server" DataSourceID="buildsource" DataTextField="name"
                                DataValueField="name">
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="buildlbl" runat="server" Text='<%# Bind("build") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Font-Size="9pt" />
                        <ItemStyle Font-Size="9pt" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="fname" HeaderText="File" SortExpression="fname" 
                        ReadOnly="True">
                        <HeaderStyle Font-Size="9pt" />
                        <ItemStyle Font-Size="9pt" />
                    </asp:BoundField>
                    <asp:CommandField ShowDeleteButton="True">
                        <ItemStyle Font-Size="9pt" />
                    </asp:CommandField>
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
            <asp:XmlDataSource ID="changedata" runat="server" DataFile="~/files.xml"></asp:XmlDataSource>
            <br />
        <%--</ContentTemplate>
    </asp:UpdatePanel>--%>
</asp:Content>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="SideBar" Visible="false">
</asp:Content>
